package org.sensmon.gui;

import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.GridBagLayout;
import javax.swing.JLabel;
import java.awt.GridBagConstraints;
import java.awt.FlowLayout;
import javax.swing.JButton;
import java.awt.Insets;
import javax.swing.JTextField;
import javax.swing.JComboBox;

public class SensorFrame extends JFrame {
	private static final long serialVersionUID = 1L;
	
	private JPanel contentPane;
	private JTextField txtNoname;

	/**
	 * Create the frame.
	 */
	public SensorFrame() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 489, 334);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(new BorderLayout(0, 0));
		
		JPanel panel = new JPanel();
		contentPane.add(panel, BorderLayout.SOUTH);
		panel.setLayout(new FlowLayout(FlowLayout.RIGHT, 5, 5));
		
		JButton btnOk = new JButton("Ok");
		panel.add(btnOk);
		
		JButton btnCancel = new JButton("Cancel");
		panel.add(btnCancel);
		
		JPanel panel_1 = new JPanel();
		contentPane.add(panel_1, BorderLayout.CENTER);
		GridBagLayout gbl_panel_1 = new GridBagLayout();
		gbl_panel_1.columnWidths = new int[]{0, 0, 0};
		gbl_panel_1.rowHeights = new int[]{0, 0, 0};
		gbl_panel_1.columnWeights = new double[]{0.0, 1.0, Double.MIN_VALUE};
		gbl_panel_1.rowWeights = new double[]{0.0, 0.0, Double.MIN_VALUE};
		panel_1.setLayout(gbl_panel_1);
		
		JLabel lblSensorName = new JLabel("Sensor name:");
		GridBagConstraints gbc_lblSensorName = new GridBagConstraints();
		gbc_lblSensorName.anchor = GridBagConstraints.EAST;
		gbc_lblSensorName.insets = new Insets(0, 0, 5, 5);
		gbc_lblSensorName.gridx = 0;
		gbc_lblSensorName.gridy = 0;
		panel_1.add(lblSensorName, gbc_lblSensorName);
		
		txtNoname = new JTextField();
		txtNoname.setText("noname");
		GridBagConstraints gbc_txtNoname = new GridBagConstraints();
		gbc_txtNoname.insets = new Insets(0, 0, 5, 0);
		gbc_txtNoname.fill = GridBagConstraints.HORIZONTAL;
		gbc_txtNoname.gridx = 1;
		gbc_txtNoname.gridy = 0;
		panel_1.add(txtNoname, gbc_txtNoname);
		txtNoname.setColumns(10);
		
		JLabel lblChannel = new JLabel("Channel:");
		GridBagConstraints gbc_lblChannel = new GridBagConstraints();
		gbc_lblChannel.anchor = GridBagConstraints.EAST;
		gbc_lblChannel.insets = new Insets(0, 0, 0, 5);
		gbc_lblChannel.gridx = 0;
		gbc_lblChannel.gridy = 1;
		panel_1.add(lblChannel, gbc_lblChannel);
		
		JComboBox comboBox = new JComboBox();
		GridBagConstraints gbc_comboBox = new GridBagConstraints();
		gbc_comboBox.fill = GridBagConstraints.HORIZONTAL;
		gbc_comboBox.gridx = 1;
		gbc_comboBox.gridy = 1;
		panel_1.add(comboBox, gbc_comboBox);
		pack();
	}

}
